package com.mp.approvalreq.dao;

import com.mp.approvalreq.entity.ConditionFlow;
import com.mp.approvalreq.entity.GeneralRequest.GeneralRequest;

import java.sql.SQLException;
import java.util.List;

public interface GeneralRequestDao {
	/**
	 * 查询全公司通用审批流集合
	 *
	 * @param companyId
	 * @return
	 * @throws SQLException
	 */
	List<GeneralRequest> selectAllGeneralRequestFlowByCompanyId(Integer companyId) throws SQLException;

	/**
	 * 批量修改通用审批流
	 *
	 * @param generalRequests
	 * @throws SQLException
	 */
	void updateBatchGeneralRequestFlow(List<GeneralRequest> generalRequests) throws SQLException;

	/**
	 * 查询全公司通用条件审批流
	 *
	 * @param companyId
	 * @return
	 * @throws SQLException
	 */
	List<GeneralRequest> selectAllGeneralConditionFlowByCompanyId(Integer companyId) throws SQLException;

	/**
	 * 批量修改条件审批流
	 *
	 * @param conditionFlows
	 * @throws SQLException
	 */
	void updateBatchGeneralConditionFlow(List<GeneralRequest> conditionFlows) throws SQLException;

	/**
	 * 获取工程通用审批流设置
	 *
	 * @param companyId
	 * @param projectId
	 * @param specificId
	 * @return
	 * @throws SQLException
	 */
	GeneralRequest selectProjectGeneralRequest(Integer companyId, Integer projectId, String specificId) throws SQLException;

	/**
	 * 获取工程默认通用审批流设置
	 *
	 * @param companyId
	 * @param projectId
	 * @return
	 * @throws SQLException
	 */
	GeneralRequest selectProjectDefaultGeneralRequest(Integer companyId, Integer projectId) throws SQLException;

	/**
	 * 根据id获取通用条件审批列表
	 *
	 * @param generalFlowId
	 * @param companyId
	 * @return
	 * @throws SQLException
	 */
	List<ConditionFlow> selectConditionFlowsById(Integer generalFlowId, Integer companyId) throws SQLException;
}
